f23c38
@@ -412,16 +412,20 @@
private boolean backTrackColumnNames(
         if(partitionCols != null) {
           for (ExprNodeDesc desc : partitionCols) {
             List<String> cols = desc.getCols();
-            for(String col : cols) {
-              columnMapping.put(col, col);
+            if ( cols != null ) {
+              for(String col : cols) {
+                columnMapping.put(col, col);
+              }
             }
           }
         }
         if(reduceKeyCols != null) {
           for (ExprNodeDesc desc : reduceKeyCols) {
             List<String> cols = desc.getCols();
-            for(String col : cols) {
-              columnMapping.put(col, col);
+            if ( cols != null ) {
+              for(String col : cols) {
+                columnMapping.put(col, col);
+              }
             }
           }
         }
